<template>
	<!-- 编辑资料 -->
	<view>
		<uni-navbar :title="'编辑资料'"></uni-navbar>
		<div class="edit-one">
			<div>
				<span>客户电话</span>
				<span>13564846759</span>
			</div>
			<div>
				<span>客户姓名</span>
				<input type="text" placeholder="请输入客户姓名">
			</div>
			<div>
				<span>性别</span>
				<view class="butt">
					<view @click="nanv(index)" :class="inlest==index?'box boxx ':'box'" v-for="(item,index) in sex"
						:key="index">{{item.text}}</view>
				</view>
			</div>
		</div>
		<div class="edit-two">
			<div>
				<span>意向等级</span>
				<input type="text" placeholder="请选择">
			</div>
			<div>
				<span>地址</span>
				<input type="text" placeholder="点击选择地址">
			</div>
			<div>
				<span>详细地址</span>
				<input type="text" placeholder="请填写详细地址">
			</div>
			<div>
				<span>备注</span>
				<span>122333
				</span>
			</div>
		</div>
		<!-- 跳到首页需要修改 -->
		<div v-if="!type" @click="toIndex" class='tijiao'>提交</div>
		
		
		<div v-if="type" @click="$u.route('/pages/applications/minecuin-selection/minecuin-selection')" class='tijiao'>提交</div>
		
		<div v-if="type" @click="toIndex" class='tijiao1'>提交信息，暂不报课</div>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				sex: [{
					text: '男',
					value: 0
				}, {
					text: '女',
					value: 1
				}],
				inlest: 0,
				type: ''
			};
		},
		onLoad(opt) {
			if (opt.type) {
				this.type = opt.type
			}
		},
		methods: {
			toIndex(){
				uni.switchTab({
					url: '/pages/index/index'
				})
			},
			nanv(index) {
				this.inlest = index
			}
		}
	}
</script>

<style lang="scss">
	.edit-one {
		margin-top: 20rpx;

		div {
			display: flex;
			justify-content: space-between;
			margin-top: 1rpx;
			padding: 30rpx;
			background-color: #fff;

			span {
				font-size: 26rpx;
				font-weight: 400;
				color: #4D4D4D;
			}

			input {
				width: 190rpx;
				height: 24rpx;
				font-size: 26rpx;
				font-weight: 400;
				color: #999999;
			}

			.butt {
				display: flex;

				.box {
					width: 69rpx;
					height: 33rpx;
					border: 1rpx solid #CCCCCC;
					border-radius: 8rpx;
					font-size: 26rpx;
					font-weight: 400;
					color: #4C4C4C;
					line-height: 33rpx;
					text-align: center;
					margin-left: 30rpx;
				}

				.boxx {
					background-color: #0287FE;
					color: #FFFFFF;
				}
			}
		}
	}

	.edit-two {
		margin-top: 15rpx;

		div {
			padding: 30rpx;
			background-color: #fff;
			margin-top: 1rpx;
			display: flex;
			justify-content: space-between;

			input {
				text-align: right;
			}

			span {
				font-size: 26rpx;
				color: #4D4D4D;
			}
		}
	}

	.tijiao {
		margin: auto;
		margin-top: 50rpx;
		width: 687rpx;
		height: 65rpx;
		background: #0590FE;
		border-radius: 8rpx;
		font-size: 30rpx;
		font-weight: 400;
		color: #FFFFFF;
		line-height: 65rpx;
		text-align: center;
	}
	
	.tijiao1{
		margin: auto;
		margin-top: 50rpx;
		width: 687rpx;
		height: 65rpx;
		background: #fff;
		border-radius: 8rpx;
		font-size: 30rpx;
		font-weight: 400;
		color: #515151;
		line-height: 65rpx;
		text-align: center;
	}
</style>
